{% extends 'user/base.html' %}

{% block page_message %}layui-this{% endblock %}

{% block content %}
    <div class="layui-tab layui-tab-brief" lay-filter="user" id="LAY_msg" style="margin-top: 15px;">
        {% if messages|length > 0 %}
            <button class="layui-btn layui-btn-danger" id="LAY_delallmsg">清空全部消息</button>
        {% endif %}

        <div id="LAY_minemsg" style="margin-top: 10px;">
            <!--<div class="fly-none">您暂时没有最新消息</div>-->
            <ul class="mine-msg">
                {% for item in messages %}
                    <li data-id="{{ item.pk }}">
                        <blockquote class="layui-elem-quote">
                            {{ item.content|safe }}
                        </blockquote>
                        <p><span>{{ item.create_at|date:'Y-m-d H:i' }}</span><a href="javascript:;"
                                                                                class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a>
                        </p>
                    </li>
                {% empty %}
                    <div style="min-height: 60px; text-align: center; padding-top:50px; color: #999;">您暂时没有最新消息</div>
                {% endfor %}
            </ul>
            {% if page_range|length > 1 %}
                {% with queryset=messages %}
                    {% include 'paginator_nav.html' %}
                {% endwith %}
            {% endif %}
        </div>
    </div>
{% endblock %}